package net.sx.minemodule.mvp.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.kedll.library.adapter.MultiTypeAdapter;
import com.kedll.library.mvp.BaseModel;

import net.sx.minemodule.mvp.item.TestCardItem;

/**
 * @author 11470
 */
public class TestCardBean extends BaseModel<TestCardItem> implements Parcelable{

    private String cardPath;
    private int cardType;
    private String cardName;
    private String cardEndNum;

    @Override
    public TestCardItem createItem(MultiTypeAdapter adapter) {
        return new TestCardItem(this);
    }

    public String getCardPath() {
        return cardPath;
    }

    public void setCardPath(String cardPath) {
        this.cardPath = cardPath;
    }

    public int getCardType() {
        return cardType;
    }

    public void setCardType(int cardType) {
        this.cardType = cardType;
    }

    public String getCardName() {
        return cardName;
    }

    public void setCardName(String cardName) {
        this.cardName = cardName;
    }

    public String getCardEndNum() {
        return cardEndNum;
    }

    public void setCardEndNum(String cardEndNum) {
        this.cardEndNum = cardEndNum;
    }

    public TestCardBean() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.cardPath);
        dest.writeInt(this.cardType);
        dest.writeString(this.cardName);
        dest.writeString(this.cardEndNum);
    }

    protected TestCardBean(Parcel in) {
        this.cardPath = in.readString();
        this.cardType = in.readInt();
        this.cardName = in.readString();
        this.cardEndNum = in.readString();
    }

    public static final Creator<TestCardBean> CREATOR = new Creator<TestCardBean>() {
        @Override
        public TestCardBean createFromParcel(Parcel source) {
            return new TestCardBean(source);
        }

        @Override
        public TestCardBean[] newArray(int size) {
            return new TestCardBean[size];
        }
    };
}
